
package c.x.jy.admin.controller;

import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import c.x.jy.dao.entity.SysUserEntity;

 

/**
 * Controller公共组件
 *

 */ 
public abstract class AbstractController {
	protected Logger logger = LoggerFactory.getLogger(getClass());
 
	protected  SysUserEntity getUser() {//getPrincipals
		return   (SysUserEntity) SecurityUtils.getSubject().getPrincipal();
	}
 
	protected Long getUserId() {
 
		return getUser().getUserId();
	}
	
	protected String getToken  ( ){
		 
		return getUser().getToken();
	}
}
